#pragma once
#include "../../../../../utils/common_ptr.h"

class ConditionValue_ConditionType
{
  static ConditionValue_ConditionType_ptr SQLSTATE;
  static ConditionValue_ConditionType_ptr SELF;
  static ConditionValue_ConditionType_ptr SYSTEM;
  static ConditionValue_ConditionType_ptr MYSQL_ERROR_CODE;

  string_ptr name;
  uint64_t mask;
  ConditionValue_ConditionType(uint64_t mask, string_ptr name);
};

class ConditionValue
{
  // type for condition   SQLSTATE | SELF | SYSTEM | mysql_error_code
  ConditionValue_ConditionType_ptr type;

  // value for condition  condition_name | sqlstate | SQLWARNING | NOT FOUND | SQLEXCEPTION | mysql_error_code
  string_ptr value;

  ConditionValue_ConditionType_ptr getType();

  void setType(ConditionValue_ConditionType_ptr type);

  string_ptr getValue();

  void setValue(string_ptr value);
};
